
/*
author:mohaijiang
time:2024年8月15日
des: 入院登记表
*/
CREATE PROCEDURE [NewtouchHis_Base].[dbo].[RPT_SETT_入院登记表]
(
    @hospitalCode varchar(50),
    @patid varchar(50)
)
AS

BEGIN
SELECT  c.patid ,
        c.CardNo AS kh ,
        zy.zyh ,
        zy.zyh AS zyh2 ,
        jb.xm ,
        jb.zjh ,
        jb.py,
        CONVERT(VARCHAR(100), jb.csny, 23) csny ,
        case jb.xb when 1 then '男' else '女' end as xb,
        CAST( (CASE  WHEN zy.zyh IS NULL THEN FLOOR(datediff(DY,jb.csny,getdate())/365.25) ELSE zy.nl END) as SMALLINT) nl,
        jb.brly ,
        jb.blh ,
        jb.dh ,
        jb.hf ,
        staff2.staffName jkjlmc,
        zy.cw ,
        ( SELECT    zdmc
          FROM      NewtouchHIS_Sett..zy_rydzd
          WHERE     zdpx = 1   AND zt=1
            AND zyh = zy.zyh AND zy_rydzd.OrganizeId= @hospitalCode
        ) zdmc1 ,
        ( SELECT    zdmc
          FROM      NewtouchHIS_Sett..zy_rydzd
          WHERE     zdpx = 2   AND zt=1
            AND zyh = zy.zyh AND zy_rydzd.OrganizeId= @hospitalCode
        ) zdmc2 ,
        ( SELECT    zdmc
          FROM      NewtouchHIS_Sett..zy_rydzd
          WHERE     zdpx = 3   AND zt=1
            AND zyh = zy.zyh AND zy_rydzd.OrganizeId= @hospitalCode
        ) zdmc3 ,
        FORMAT(ryrq, 'yyyy-MM-dd') as ryrq ,
        CONVERT(VARCHAR(100), cyrq, 23) cyrq ,
        ks.Name ksmc ,
        ks.Code ks,
        bq.bqmc ,
        ISNULL(zy.gms, jb.gms) gms,
        case zy.rybq  when 1 then '一般' when 2 then '病重' when 3  then '病危' else '' end as rybq,
        ISNULL(zy.zy,jb.zy) zy ,
        ISNULL(zy.cs_sheng, jb.cs_sheng) cs_sheng ,
        ISNULL(zy.cs_shi, jb.cs_shi) cs_shi ,
        ISNULL(zy.cs_xian, jb.cs_xian) cs_xian ,
        ISNULL(zy.cs_dz, jb.cs_dz) cs_dz ,
        ISNULL(zy.xian_dz, jb.xian_dz) xian_dz ,
        ISNULL(zy.xian_sheng, jb.xian_sheng) xian_sheng ,
        ISNULL(zy.xian_shi, jb.xian_shi) xian_shi ,
        ISNULL(zy.xian_xian, jb.xian_xian) xian_xian ,
        ISNULL(zy.hu_dz, jb.hu_dz) hu_dz ,
        ISNULL(zy.hu_sheng, jb.hu_sheng) hu_sheng ,
        ISNULL(zy.hu_shi, jb.hu_shi) hu_shi ,
        ISNULL(zy.hu_xian, jb.hu_xian) hu_xian ,
        ISNULL(ISNULL(zy.cs_sheng, jb.cs_sheng),'') +  isnull(ISNULL(zy.cs_shi, jb.cs_shi),'' )+ ISNULL(ISNULL(zy.cs_xian, jb.cs_xian),'') + ISNULL(ISNULL(zy.cs_dz, jb.cs_dz),'') as birthAddress,
        ISNULL(ISNULL(zy.xian_sheng, jb.xian_sheng),'') +  isnull(ISNULL(zy.xian_shi, jb.xian_shi),'' )+  ISNULL(ISNULL(zy.xian_xian, jb.xian_xian),'') + ISNULL(ISNULL(zy.xian_dz, jb.xian_dz),'') as xianAddress,
        ISNULL(ISNULL(zy.hu_sheng, jb.hu_sheng),'') + ISNULL(ISNULL(zy.hu_shi, jb.hu_shi),'') + ISNULL(ISNULL(zy.hu_xian, jb.hu_xian),'') + ISNULL(ISNULL(zy.hu_dz, jb.hu_dz),'') as huAddress,
        ISNULL(zy.jjlxr_sheng, jb.jjlxr_sheng) jjlxr_sheng ,
        ISNULL(zy.jjlxr_shi, jb.jjlxr_shi) jjlxr_shi ,
        ISNULL(zy.jjlxr_xian, jb.jjlxr_xian) jjlxr_xian ,
        ISNULL(zy.jjlxr_dz, jb.jjlxr_dz) jjlxr_dz ,
        ISNULL(ISNULL(zy.jjlxr_sheng, jb.jjlxr_sheng),'') + ISNULL(ISNULL(zy.jjlxr_shi, jb.jjlxr_shi),'') + ISNULL(ISNULL(zy.jjlxr_xian, jb.jjlxr_xian),'') +         ISNULL(ISNULL(zy.jjlxr_dz, jb.jjlxr_dz),'') as jjlxrAddress,
        case ( ISNULL(zy.hy, jb.hf) ) when 0 then '未婚' when '1' then '已婚' when 9 then '不详' else '' end as  hy ,
        gj.gjmc ,
        gj.gjCode ,
        mz.mzmc ,
        mz.mzCode ,
        ( ISNULL(zy.bje, 0) ) bje ,
        ISNULL(zy.lxr,jb.jjllr) lxr ,
        relaItem.Name as lxrRelaName,
        zy.lxr2 ,
        jb.dybh,
        (ISNULL(zy.lxrdh,jb.jjlldh)) lxrdh ,
        zy.lxryddh2 ,
        zy.lxrdz ,
        zy.lxrdz2 ,
        zy.lxrEmail ,
        zy.lxrEmail2 ,
        ( ISNULL(zy.lxrgx,jb.jjllrgx) ) lxrgx ,
        ( ISNULL(zy.lxrgx2, '') ) lxrgx2 ,
        zy.lxrjtdh ,
        zy.lxrjtdh2 ,
        zy.lxrWebchat ,
        zy.lxrWebchat2 ,
        case zy.rytj when '9' then '其他' when '21' then '普通住院' when '23' then '转外诊治住院' when '24' then '急诊转住院' when '52' then '生育住院' when '9902' then '重大疾病住院' when '9904' then '儿童两病住院' when '9907' then '耐多药结核住院' when '9921' then '新生儿随母住院' when '9922' then '120' when '9925' then '转入住院' else '' end as rytj,
        case when zy.zyh is not null then zyxz.brxzmc else jbxz.brxzmc end brxzmc,
        case when zy.zyh is not null then zyxz.brxzbh else jbxz.brxzbh end brxzbh,
        case when zy.zyh is not null then zyxz.brxz else jbxz.brxz end brxz,
        staff2.staffGh jkjl ,
        staff.staffgh doctor ,
        staff.staffName doctormc ,
        ( SELECT    CAST(zdCode AS VARCHAR(10)) + '-'
                        + CAST(zdmc AS VARCHAR(30))
          FROM      NewtouchHIS_Sett..zy_rydzd
          WHERE     zdpx = 1   AND zt=1
            AND zyh = zy.zyh AND zy_rydzd.OrganizeId= @hospitalCode
        ) ryzd1 ,
        ( SELECT    CAST(zdCode AS VARCHAR(10)) + '-'
                        + CAST(zdmc AS VARCHAR(30))
          FROM      NewtouchHIS_Sett..zy_rydzd
          WHERE     zdpx = 2   AND zt=1
            AND zyh = zy.zyh AND zy_rydzd.OrganizeId= @hospitalCode
        ) ryzd2 ,
        ( SELECT    CAST(zdCode AS VARCHAR(10)) + '-'
                        + CAST(zdmc AS VARCHAR(30))
          FROM      NewtouchHIS_Sett..zy_rydzd
          WHERE     zdpx = 3   AND zt=1
            AND zyh = zy.zyh AND zy_rydzd.OrganizeId= @hospitalCode
        ) ryzd3 ,
        CAST(bq.bqId AS VARCHAR(10)) + '-' + CAST(bq.bqCode AS VARCHAR(10)) bq ,
        jb.zjlx ,
        zy.ys,
        jb.phone,jb.jjlldh,jb.jjllr,jb.bz,jb.dwdz dz,jb.dwmc,zy.zcyy ,c.cblb,
        zy.ssczdm,zy.ssczmc,zy.syfwzh,zy.sylb,zy.sysslb,zy.wybz,zy.yzs,zy.tc,zy.tes,zy.zcbz,zy.syrq
FROM   NewtouchHIS_Sett..xt_brjbxx jb
           LEFT JOIN NewtouchHIS_Sett.dbo.zy_brjbxx zy ON zy.patid = jb.patid  AND  zy.OrganizeId=@hospitalCode
           LEFT JOIN NewtouchHIS_Sett..xt_card c  ON zy.kh = c.cardno and jb.OrganizeId= @hospitalCode
           LEFT JOIN NewtouchHIS_Sett.dbo.xt_brxz jbxz ON jbxz.brxz = zy.brxz
    AND jbxz.zt = '1' AND jbxz.OrganizeId=@hospitalCode
           LEFT JOIN NewtouchHIS_Sett.dbo.xt_brxz zyxz ON zyxz.brxz = zy.brxz
    AND zyxz.zt = '1' AND zyxz.OrganizeId=@hospitalCode
           LEFT JOIN NewtouchHIS_Sett.dbo.zy_rydzd zd ON zd.zyh = zy.zyh AND zd.OrganizeId=@hospitalCode
           LEFT JOIN [NewtouchHIS_Base]..V_S_Sys_Department ks ON ks.Code = zy.ks
    AND ks.OrganizeId = @hospitalCode
    LEFT JOIN NewtouchHIS_Base..V_S_xt_bq bq ON zy.bq = bq.bqCode AND bq.OrganizeId=@hospitalCode
    LEFT JOIN NewtouchHIS_Base.dbo.V_S_xt_gj gj ON zy.gj = gj.gjCode
    LEFT JOIN NewtouchHIS_Base.dbo.V_C_Sys_StaffDuty staff ON staff.StaffGh = zy.doctor  AND staff.DutyCode='Doctor' AND staff.OrganizeId=@hospitalCode
    LEFT JOIN NewtouchHIS_Base.dbo.V_C_Sys_StaffDuty staff2 ON staff2.StaffGh = zy.jkjl AND staff2.DutyCode='RehabDoctor' AND staff2.OrganizeId=@hospitalCode
    LEFT JOIN NewtouchHIS_Base.dbo.V_S_xt_mz mz ON mz.mzCode = zy.mz
    LEFT JOIN NewtouchHIS_Base.dbo.Sys_ItemsDetail relaItem on (relaItem.code = zy.lxrgx  and relaItem.ItemId = '316da863-9ee1-4c09-b326-e43cee24bc61')
where jb.patid=@patid

END

go



SET IDENTITY_INSERT NewtouchHIS_Base.dbo.Sys_Report ON;
INSERT INTO NewtouchHIS_Base.dbo.Sys_Report (ReportID, HospitalCode, SystemCode, SystemName, ReportCode, ReportName, PinYin, ReportDes, ReportType, CreateTime, CreatorCode, LastModifyTime, LastModifierCode, px, zt, StatusTemplateID, ParentId, DirectoryFlag)VALUES (1202, N'6d5752a7-234a-403e-aa1c-df8b45d3469f', N'SETT', N'结算系统', N'1298', N'入院登记表', N'入院登记表', N'入院登记表', 1, N'2024-08-14 14:05:40.267', N'xztest', null, null, null, 1, null, 1, 0);
SET IDENTITY_INSERT NewtouchHIS_Base.dbo.Sys_Report OFF;

SET IDENTITY_INSERT NewtouchHIS_Base.dbo.Sys_ReportTemplate ON;
INSERT INTO NewtouchHIS_Base.dbo.Sys_ReportTemplate (TemplateID, HospitalCode, SystemCode, ReportCode, ReportNameDes, Content, ReportStatus, CreateTime, CreatorCode, LastModifyTime, LastModifierCode, zt)VALUES (1219, N'6d5752a7-234a-403e-aa1c-df8b45d3469f', N'SETT', N'1298', N'入院登记表', N'﻿<?xml version="1.0" encoding="utf-8"?><Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition"><dd:Name xmlns:dd="http://schemas.datadynamics.com/reporting/2005/02/reportdefinition">1219_6d5752a7-234a-403e-aa1c-df8b45d3469f_&amp;#x5165;&amp;#x9662;&amp;#x767B;&amp;#x8BB0;&amp;#x8868;.rdlx</dd:Name><Body><Height>11cm</Height><ReportItems><Textbox Name="文本框1"><Top>1cm</Top><Left>6.5cm</Left><Width>4cm</Width><Height>1cm</Height><Style><FontFamily>宋体</FontFamily><FontSize>16pt</FontSize><FontWeight>700</FontWeight><PaddingBottom>2pt</PaddingBottom><PaddingLeft>2pt</PaddingLeft><PaddingRight>2pt</PaddingRight><PaddingTop>2pt</PaddingTop></Style><ZIndex>1</ZIndex><CanGrow>true</CanGrow><Value>入院登记表</Value></Textbox><Textbox Name="文本框20"><Top>2cm</Top><Left>1cm</Left><Width>3.625cm</Width><Height>0.75cm</Height><Style><FontFamily>微软雅黑</FontFamily><PaddingBottom>2pt</PaddingBottom><PaddingLeft>2pt</PaddingLeft><PaddingRight>2pt</PaddingRight><PaddingTop>2pt</PaddingTop><TextAlign>Left</TextAlign><VerticalAlign>Middle</VerticalAlign><BorderColor><Default>DimGray</Default></BorderColor><BorderStyle><Default>Solid</Default></BorderStyle></Style><ZIndex>5</ZIndex><CanGrow>true</CanGrow><Value>="患者姓名：" &amp; First(Fields!xm.Value)</Value></Textbox><Textbox Name="文本框21"><Top>2cm</Top><Left>4.623cm</Left><Width>3.625cm</Width><Height>0.75cm</Height><Style><FontFamily>微软雅黑</FontFamily><PaddingBottom>2pt</PaddingBottom><PaddingLeft>2pt</PaddingLeft><PaddingRight>2pt</PaddingRight><PaddingTop>2pt</PaddingTop><TextAlign>Left</TextAlign><VerticalAlign>Middle</VerticalAlign><BorderColor><Default>DimGray</Default></BorderColor><BorderStyle><Default>Solid</Default></BorderStyle></Style><ZIndex>6</ZIndex><CanGrow>true</CanGrow><Value>="报销政策：" &amp; First(Fields!brxzmc.Value)</Value></Textbox><Textbox Name="文本框22"><Top>2cm</Top><Left>8.248cm</Left><Width>3.625cm</Width><Height>0.75cm</Height><Style><FontFamily>微软雅黑</FontFamily><PaddingBottom>2pt</PaddingBottom><PaddingLeft>2pt</PaddingLeft><PaddingRight>2pt</PaddingRight><PaddingTop>2pt</PaddingTop><TextAlign>Left</TextAlign><VerticalAlign>Middle</VerticalAlign><BorderColor><Default>DimGray</Default></BorderColor><BorderStyle><Default>Solid</Default></BorderStyle></Style><ZIndex>7</ZIndex><CanGrow>true</CanGrow><Value>="性别：" &amp; First(Fields!xb.Value)</Value></Textbox><Textbox Name="文本框23"><Top>2cm</Top><Left>11.873cm</Left><Width>3.625cm</Width><Height>0.75cm</Height><Style><FontFamily>微软雅黑</FontFamily><PaddingBottom>2pt</PaddingBottom><PaddingLeft>2pt</PaddingLeft><PaddingRight>2pt</PaddingRight><PaddingTop>2pt</PaddingTop><TextAlign>Left</TextAlign><VerticalAlign>Middle</VerticalAlign><BorderColor><Default>DimGray</Default></BorderColor><BorderStyle><Default>Solid</Default></BorderStyle></Style><ZIndex>8</ZIndex><CanGrow>true</CanGrow><Value>="年龄：" &amp; First(Fields!nl.Value) &amp; "  岁"</Value></Textbox><Textbox Name="文本框24"><Top>2.75cm</Top><Left>0.998cm</Left><Width>7.25cm</Width><Height>0.75cm</Height><Style><FontFamily>微软雅黑</FontFamily><PaddingBottom>2pt</PaddingBottom><PaddingLeft>2pt</PaddingLeft><PaddingRight>2pt</PaddingRight><PaddingTop>2pt</PaddingTop><TextAlign>Left</TextAlign><VerticalAlign>Middle</VerticalAlign><BorderColor><Default>DimGray</Default></BorderColor><BorderStyle><Default>Solid</Default></BorderStyle></Style><ZIndex>9</ZIndex><CanGrow>true</CanGrow><Value>="身份证号：" &amp; First(Fields!zjh.Value)</Value></Textbox><Textbox Name="文本框25"><Top>2.75cm</Top><Left>8.248cm</Left><Width>7.25cm</Width><Height>0.75cm</Height><Style><FontFamily>微软雅黑</FontFamily><PaddingBottom>2pt</PaddingBottom><PaddingLeft>2pt</PaddingLeft><PaddingRight>2pt</PaddingRight><PaddingTop>2pt</PaddingTop><TextAlign>Left</TextAlign><VerticalAlign>Middle</VerticalAlign><BorderColor><Default>DimGray</Default></BorderColor><BorderStyle><Default>Solid</Default></BorderStyle></Style><ZIndex>10</ZIndex><CanGrow>true</CanGrow><Value>="出生日期：" &amp; First(Fields!csny.Value)</Value></Textbox><Textbox Name="文本框26"><Top>3.5cm</Top><Left>0.998cm</Left><Width>4.834cm</Width><Height>0.75cm</Height><Style><FontFamily>微软雅黑</FontFamily><PaddingBottom>2pt</PaddingBottom><PaddingLeft>2pt</PaddingLeft><PaddingRight>2pt</PaddingRight><PaddingTop>2pt</PaddingTop><TextAlign>Left</TextAlign><VerticalAlign>Middle</VerticalAlign><BorderColor><Default>DimGray</Default></BorderColor><BorderStyle><Default>Solid</Default></BorderStyle></Style><ZIndex>11</ZIndex><CanGrow>true</CanGrow><Value>="住院科室：" &amp; First(Fields!ksmc.Value)</Value></Textbox><Textbox Name="文本框27"><Top>3.5cm</Top><Left>5.833cm</Left><Width>4.834cm</Width><Height>0.75cm</Height><Style><FontFamily>微软雅黑</FontFamily><PaddingBottom>2pt</PaddingBottom><PaddingLeft>2pt</PaddingLeft><PaddingRight>2pt</PaddingRight><PaddingTop>2pt</PaddingTop><TextAlign>Left</TextAlign><VerticalAlign>Middle</VerticalAlign><BorderColor><Default>DimGray</Default></BorderColor><BorderStyle><Default>Solid</Default></BorderStyle></Style><ZIndex>12</ZIndex><CanGrow>true</CanGrow><Value>="住院病区：" &amp; First(Fields!bqmc.Value)</Value></Textbox><Textbox Name="文本框28"><Top>3.5cm</Top><Left>10.666cm</Left><Width>4.832cm</Width><Height>0.75cm</Height><Style><FontFamily>微软雅黑</FontFamily><PaddingBottom>2pt</PaddingBottom><PaddingLeft>2pt</PaddingLeft><PaddingRight>2pt</PaddingRight><PaddingTop>2pt</PaddingTop><TextAlign>Left</TextAlign><VerticalAlign>Middle</VerticalAlign><BorderColor><Default>DimGray</Default></BorderColor><BorderStyle><Default>Solid</Default></BorderStyle></Style><ZIndex>13</ZIndex><CanGrow>true</CanGrow><Value>="入院日期：" &amp; First(Fields!ryrq.Value)</Value></Textbox><Textbox Name="文本框29"><Top>4.25cm</Top><Left>0.998cm</Left><Width>14.502cm</Width><Height>0.75cm</Height><Style><FontFamily>微软雅黑</FontFamily><PaddingBottom>2pt</PaddingBottom><PaddingLeft>2pt</PaddingLeft><PaddingRight>2pt</PaddingRight><PaddingTop>2pt</PaddingTop><TextAlign>Left</TextAlign><VerticalAlign>Middle</VerticalAlign><BorderColor><Default>DimGray</Default></BorderColor><BorderStyle><Default>Solid</Default></BorderStyle></Style><ZIndex>14</ZIndex><CanGrow>true</CanGrow><Value>="入院诊断：" &amp; First(Fields!zdmc1.Value)</Value></Textbox><Textbox Name="文本框30"><Top>5cm</Top><Left>1cm</Left><Width>4.834cm</Width><Height>0.75cm</Height><Style><FontFamily>微软雅黑</FontFamily><PaddingBottom>2pt</PaddingBottom><PaddingLeft>2pt</PaddingLeft><PaddingRight>2pt</PaddingRight><PaddingTop>2pt</PaddingTop><TextAlign>Left</TextAlign><VerticalAlign>Middle</VerticalAlign><BorderColor><Default>DimGray</Default></BorderColor><BorderStyle><Default>Solid</Default></BorderStyle></Style><ZIndex>15</ZIndex><CanGrow>true</CanGrow><Value>="医疗类别：" &amp; First(Fields!rytj.Value)</Value></Textbox><Textbox Name="文本框31"><Top>5cm</Top><Left>5.833cm</Left><Width>4.834cm</Width><Height>0.75cm</Height><Style><FontFamily>微软雅黑</FontFamily><PaddingBottom>2pt</PaddingBottom><PaddingLeft>2pt</PaddingLeft><PaddingRight>2pt</PaddingRight><PaddingTop>2pt</PaddingTop><TextAlign>Left</TextAlign><VerticalAlign>Middle</VerticalAlign><BorderColor><Default>DimGray</Default></BorderColor><BorderStyle><Default>Solid</Default></BorderStyle></Style><ZIndex>16</ZIndex><CanGrow>true</CanGrow><Value>="入院病情：" &amp; First(Fields!rybq.Value)</Value></Textbox><Textbox Name="文本框32"><Top>5cm</Top><Left>10.668cm</Left><Width>4.832cm</Width><Height>0.75cm</Height><Style><FontFamily>微软雅黑</FontFamily><PaddingBottom>2pt</PaddingBottom><PaddingLeft>2pt</PaddingLeft><PaddingRight>2pt</PaddingRight><PaddingTop>2pt</PaddingTop><TextAlign>Left</TextAlign><VerticalAlign>Middle</VerticalAlign><BorderColor><Default>DimGray</Default></BorderColor><BorderStyle><Default>Solid</Default></BorderStyle></Style><ZIndex>17</ZIndex><CanGrow>true</CanGrow><Value>="过敏史：" &amp; First(Fields!gms.Value)</Value></Textbox><Textbox Name="文本框33"><Top>5.75cm</Top><Left>0.998cm</Left><Width>14.502cm</Width><Height>0.75cm</Height><Style><FontFamily>微软雅黑</FontFamily><PaddingBottom>2pt</PaddingBottom><PaddingLeft>2pt</PaddingLeft><PaddingRight>2pt</PaddingRight><PaddingTop>2pt</PaddingTop><TextAlign>Left</TextAlign><VerticalAlign>Middle</VerticalAlign><BorderColor><Default>DimGray</Default></BorderColor><BorderStyle><Default>Solid</Default></BorderStyle></Style><ZIndex>18</ZIndex><CanGrow>true</CanGrow><Value>="出生地：" &amp; First(Fields!birthAddress.Value)</Value></Textbox><Textbox Name="文本框34"><Top>6.5cm</Top><Left>0.995cm</Left><Width>14.502cm</Width><Height>0.75cm</Height><Style><FontFamily>微软雅黑</FontFamily><PaddingBottom>2pt</PaddingBottom><PaddingLeft>2pt</PaddingLeft><PaddingRight>2pt</PaddingRight><PaddingTop>2pt</PaddingTop><TextAlign>Left</TextAlign><VerticalAlign>Middle</VerticalAlign><BorderColor><Default>DimGray</Default></BorderColor><BorderStyle><Default>Solid</Default></BorderStyle></Style><ZIndex>19</ZIndex><CanGrow>true</CanGrow><Value>="现住址：" &amp; First(Fields!xianAddress.Value)</Value></Textbox><Textbox Name="文本框35"><Top>7.25cm</Top><Left>0.995cm</Left><Width>14.502cm</Width><Height>0.75cm</Height><Style><FontFamily>微软雅黑</FontFamily><PaddingBottom>2pt</PaddingBottom><PaddingLeft>2pt</PaddingLeft><PaddingRight>2pt</PaddingRight><PaddingTop>2pt</PaddingTop><TextAlign>Left</TextAlign><VerticalAlign>Middle</VerticalAlign><BorderColor><Default>DimGray</Default></BorderColor><BorderStyle><Default>Solid</Default></BorderStyle></Style><ZIndex>20</ZIndex><CanGrow>true</CanGrow><Value>="户口地址：" &amp; First(Fields!huAddress.Value)</Value></Textbox><Textbox Name="文本框36"><Top>8cm</Top><Left>11.878cm</Left><Width>3.625cm</Width><Height>0.75cm</Height><Style><FontFamily>微软雅黑</FontFamily><PaddingBottom>2pt</PaddingBottom><PaddingLeft>2pt</PaddingLeft><PaddingRight>2pt</PaddingRight><PaddingTop>2pt</PaddingTop><TextAlign>Left</TextAlign><VerticalAlign>Middle</VerticalAlign><BorderColor><Default>DimGray</Default></BorderColor><BorderStyle><Default>Solid</Default></BorderStyle></Style><ZIndex>21</ZIndex><CanGrow>true</CanGrow><Value>="职业：" &amp; First(Fields!zy.Value)</Value></Textbox><Textbox Name="文本框37"><Top>8cm</Top><Left>1.004cm</Left><Width>3.625cm</Width><Height>0.75cm</Height><Style><FontFamily>微软雅黑</FontFamily><PaddingBottom>2pt</PaddingBottom><PaddingLeft>2pt</PaddingLeft><PaddingRight>2pt</PaddingRight><PaddingTop>2pt</PaddingTop><TextAlign>Left</TextAlign><VerticalAlign>Middle</VerticalAlign><BorderColor><Default>DimGray</Default></BorderColor><BorderStyle><Default>Solid</Default></BorderStyle></Style><ZIndex>22</ZIndex><CanGrow>true</CanGrow><Value>="国籍：" &amp; First(Fields!gjmc.Value)</Value></Textbox><Textbox Name="文本框38"><Top>8cm</Top><Left>4.629cm</Left><Width>3.625cm</Width><Height>0.75cm</Height><Style><FontFamily>微软雅黑</FontFamily><PaddingBottom>2pt</PaddingBottom><PaddingLeft>2pt</PaddingLeft><PaddingRight>2pt</PaddingRight><PaddingTop>2pt</PaddingTop><TextAlign>Left</TextAlign><VerticalAlign>Middle</VerticalAlign><BorderColor><Default>DimGray</Default></BorderColor><BorderStyle><Default>Solid</Default></BorderStyle></Style><ZIndex>23</ZIndex><CanGrow>true</CanGrow><Value>="民族：" &amp; First(Fields!mzmc.Value)</Value></Textbox><Textbox Name="文本框39"><Top>8cm</Top><Left>8.254cm</Left><Width>3.625cm</Width><Height>0.75cm</Height><Style><FontFamily>微软雅黑</FontFamily><PaddingBottom>2pt</PaddingBottom><PaddingLeft>2pt</PaddingLeft><PaddingRight>2pt</PaddingRight><PaddingTop>2pt</PaddingTop><TextAlign>Left</TextAlign><VerticalAlign>Middle</VerticalAlign><BorderColor><Default>DimGray</Default></BorderColor><BorderStyle><Default>Solid</Default></BorderStyle></Style><ZIndex>24</ZIndex><CanGrow>true</CanGrow><Value>="婚姻：" &amp; First(Fields!hy.Value)</Value></Textbox><Textbox Name="文本框40"><Top>8.75cm</Top><Left>1.004cm</Left><Width>3.625cm</Width><Height>0.75cm</Height><Style><FontFamily>微软雅黑</FontFamily><PaddingBottom>2pt</PaddingBottom><PaddingLeft>2pt</PaddingLeft><PaddingRight>2pt</PaddingRight><PaddingTop>2pt</PaddingTop><TextAlign>Left</TextAlign><VerticalAlign>Middle</VerticalAlign><BorderColor><Default>DimGray</Default></BorderColor><BorderStyle><Default>Solid</Default></BorderStyle></Style><ZIndex>25</ZIndex><CanGrow>true</CanGrow><Value>="紧急联系人：" &amp; First(Fields!lxr.Value)</Value></Textbox><Textbox Name="文本框41"><Top>8.75cm</Top><Left>4.629cm</Left><Width>3.625cm</Width><Height>0.75cm</Height><Style><FontFamily>微软雅黑</FontFamily><PaddingBottom>2pt</PaddingBottom><PaddingLeft>2pt</PaddingLeft><PaddingRight>2pt</PaddingRight><PaddingTop>2pt</PaddingTop><TextAlign>Left</TextAlign><VerticalAlign>Middle</VerticalAlign><BorderColor><Default>DimGray</Default></BorderColor><BorderStyle><Default>Solid</Default></BorderStyle></Style><ZIndex>26</ZIndex><CanGrow>true</CanGrow><Value>="关系：" &amp; First(Fields!lxrRelaName.Value)</Value></Textbox><Textbox Name="文本框42"><Top>8.75cm</Top><Left>8.253cm</Left><Width>7.25cm</Width><Height>0.75cm</Height><Style><FontFamily>微软雅黑</FontFamily><PaddingBottom>2pt</PaddingBottom><PaddingLeft>2pt</PaddingLeft><PaddingRight>2pt</PaddingRight><PaddingTop>2pt</PaddingTop><TextAlign>Left</TextAlign><VerticalAlign>Middle</VerticalAlign><BorderColor><Default>DimGray</Default></BorderColor><BorderStyle><Default>Solid</Default></BorderStyle></Style><ZIndex>27</ZIndex><CanGrow>true</CanGrow><Value>="联系电话：" &amp; First(Fields!lxrdh.Value)</Value></Textbox><Textbox Name="文本框43"><Top>9.5cm</Top><Left>1.004cm</Left><Width>14.493cm</Width><Height>0.75cm</Height><Style><FontFamily>微软雅黑</FontFamily><PaddingBottom>2pt</PaddingBottom><PaddingLeft>2pt</PaddingLeft><PaddingRight>2pt</PaddingRight><PaddingTop>2pt</PaddingTop><TextAlign>Left</TextAlign><VerticalAlign>Middle</VerticalAlign><BorderColor><Default>DimGray</Default></BorderColor><BorderStyle><Default>Solid</Default></BorderStyle></Style><ZIndex>28</ZIndex><CanGrow>true</CanGrow><Value>="紧急联系人地址：" &amp; First(Fields!jjlxrAddress.Value)</Value></Textbox><Textbox Name="文本框44"><Top>10.25cm</Top><Left>0.995cm</Left><Width>14.493cm</Width><Height>0.75cm</Height><Style><FontFamily>微软雅黑</FontFamily><FontWeight>700</FontWeight><PaddingBottom>2pt</PaddingBottom><PaddingLeft>2pt</PaddingLeft><PaddingRight>2pt</PaddingRight><PaddingTop>2pt</PaddingTop><TextAlign>Right</TextAlign><VerticalAlign>Middle</VerticalAlign><BorderColor><Default>DimGray</Default></BorderColor><BorderStyle><Default>Solid</Default></BorderStyle></Style><ZIndex>29</ZIndex><CanGrow>true</CanGrow><Value>经办人签名：___________    经办时间：____________</Value></Textbox></ReportItems></Body><BottomMargin>2.5cm</BottomMargin><LeftMargin>2.5cm</LeftMargin><PageHeight>29.7cm</PageHeight><PageWidth>21cm</PageWidth><RightMargin>2.5cm</RightMargin><TopMargin>2.5cm</TopMargin><Width>15.503cm</Width><ReportParameters><ReportParameter Name="hospitalCode"><DataType>String</DataType><Prompt>hospitalCode</Prompt><UsedInQuery>True</UsedInQuery></ReportParameter><ReportParameter Name="patid"><DataType>String</DataType><Prompt>patid</Prompt><UsedInQuery>True</UsedInQuery></ReportParameter></ReportParameters><DataSources><DataSource Name="数据源1"><ConnectionProperties><ConnectString>Data Source=192.168.9.190,1433;Initial Catalog=NewtouchHIS_Base;User ID=sa;Password=Abcd1234;MultipleActiveResultSets=true;</ConnectString><DataProvider>SQL</DataProvider></ConnectionProperties></DataSource></DataSources><DataSets><DataSet Name="数据集1"><Fields><Field Name="patid"><DataField>patid</DataField></Field><Field Name="kh"><DataField>kh</DataField></Field><Field Name="zyh"><DataField>zyh</DataField></Field><Field Name="zyh2"><DataField>zyh2</DataField></Field><Field Name="xm"><DataField>xm</DataField></Field><Field Name="zjh"><DataField>zjh</DataField></Field><Field Name="py"><DataField>py</DataField></Field><Field Name="csny"><DataField>csny</DataField></Field><Field Name="xb"><DataField>xb</DataField></Field><Field Name="nl"><DataField>nl</DataField></Field><Field Name="brly"><DataField>brly</DataField></Field><Field Name="blh"><DataField>blh</DataField></Field><Field Name="dh"><DataField>dh</DataField></Field><Field Name="hf"><DataField>hf</DataField></Field><Field Name="jkjlmc"><DataField>jkjlmc</DataField></Field><Field Name="cw"><DataField>cw</DataField></Field><Field Name="zdmc1"><DataField>zdmc1</DataField></Field><Field Name="zdmc2"><DataField>zdmc2</DataField></Field><Field Name="zdmc3"><DataField>zdmc3</DataField></Field><Field Name="ryrq"><DataField>ryrq</DataField></Field><Field Name="cyrq"><DataField>cyrq</DataField></Field><Field Name="ksmc"><DataField>ksmc</DataField></Field><Field Name="ks"><DataField>ks</DataField></Field><Field Name="bqmc"><DataField>bqmc</DataField></Field><Field Name="gms"><DataField>gms</DataField></Field><Field Name="rybq"><DataField>rybq</DataField></Field><Field Name="zy"><DataField>zy</DataField></Field><Field Name="cs_sheng"><DataField>cs_sheng</DataField></Field><Field Name="cs_shi"><DataField>cs_shi</DataField></Field><Field Name="cs_xian"><DataField>cs_xian</DataField></Field><Field Name="cs_dz"><DataField>cs_dz</DataField></Field><Field Name="xian_dz"><DataField>xian_dz</DataField></Field><Field Name="xian_sheng"><DataField>xian_sheng</DataField></Field><Field Name="xian_shi"><DataField>xian_shi</DataField></Field><Field Name="xian_xian"><DataField>xian_xian</DataField></Field><Field Name="hu_dz"><DataField>hu_dz</DataField></Field><Field Name="hu_sheng"><DataField>hu_sheng</DataField></Field><Field Name="hu_shi"><DataField>hu_shi</DataField></Field><Field Name="hu_xian"><DataField>hu_xian</DataField></Field><Field Name="birthAddress"><DataField>birthAddress</DataField></Field><Field Name="xianAddress"><DataField>xianAddress</DataField></Field><Field Name="huAddress"><DataField>huAddress</DataField></Field><Field Name="jjlxr_sheng"><DataField>jjlxr_sheng</DataField></Field><Field Name="jjlxr_shi"><DataField>jjlxr_shi</DataField></Field><Field Name="jjlxr_xian"><DataField>jjlxr_xian</DataField></Field><Field Name="jjlxr_dz"><DataField>jjlxr_dz</DataField></Field><Field Name="jjlxrAddress"><DataField>jjlxrAddress</DataField></Field><Field Name="hy"><DataField>hy</DataField></Field><Field Name="gjmc"><DataField>gjmc</DataField></Field><Field Name="gjCode"><DataField>gjCode</DataField></Field><Field Name="mzmc"><DataField>mzmc</DataField></Field><Field Name="mzCode"><DataField>mzCode</DataField></Field><Field Name="bje"><DataField>bje</DataField></Field><Field Name="lxr"><DataField>lxr</DataField></Field><Field Name="lxrRelaName"><DataField>lxrRelaName</DataField></Field><Field Name="lxr2"><DataField>lxr2</DataField></Field><Field Name="dybh"><DataField>dybh</DataField></Field><Field Name="lxrdh"><DataField>lxrdh</DataField></Field><Field Name="lxryddh2"><DataField>lxryddh2</DataField></Field><Field Name="lxrdz"><DataField>lxrdz</DataField></Field><Field Name="lxrdz2"><DataField>lxrdz2</DataField></Field><Field Name="lxrEmail"><DataField>lxrEmail</DataField></Field><Field Name="lxrEmail2"><DataField>lxrEmail2</DataField></Field><Field Name="lxrgx"><DataField>lxrgx</DataField></Field><Field Name="lxrgx2"><DataField>lxrgx2</DataField></Field><Field Name="lxrjtdh"><DataField>lxrjtdh</DataField></Field><Field Name="lxrjtdh2"><DataField>lxrjtdh2</DataField></Field><Field Name="lxrWebchat"><DataField>lxrWebchat</DataField></Field><Field Name="lxrWebchat2"><DataField>lxrWebchat2</DataField></Field><Field Name="rytj"><DataField>rytj</DataField></Field><Field Name="brxzmc"><DataField>brxzmc</DataField></Field><Field Name="brxzbh"><DataField>brxzbh</DataField></Field><Field Name="brxz"><DataField>brxz</DataField></Field><Field Name="jkjl"><DataField>jkjl</DataField></Field><Field Name="doctor"><DataField>doctor</DataField></Field><Field Name="doctormc"><DataField>doctormc</DataField></Field><Field Name="ryzd1"><DataField>ryzd1</DataField></Field><Field Name="ryzd2"><DataField>ryzd2</DataField></Field><Field Name="ryzd3"><DataField>ryzd3</DataField></Field><Field Name="bq"><DataField>bq</DataField></Field><Field Name="zjlx"><DataField>zjlx</DataField></Field><Field Name="ys"><DataField>ys</DataField></Field><Field Name="phone"><DataField>phone</DataField></Field><Field Name="jjlldh"><DataField>jjlldh</DataField></Field><Field Name="jjllr"><DataField>jjllr</DataField></Field><Field Name="bz"><DataField>bz</DataField></Field><Field Name="dz"><DataField>dz</DataField></Field><Field Name="dwmc"><DataField>dwmc</DataField></Field><Field Name="zcyy"><DataField>zcyy</DataField></Field><Field Name="cblb"><DataField>cblb</DataField></Field><Field Name="ssczdm"><DataField>ssczdm</DataField></Field><Field Name="ssczmc"><DataField>ssczmc</DataField></Field><Field Name="syfwzh"><DataField>syfwzh</DataField></Field><Field Name="sylb"><DataField>sylb</DataField></Field><Field Name="sysslb"><DataField>sysslb</DataField></Field><Field Name="wybz"><DataField>wybz</DataField></Field><Field Name="yzs"><DataField>yzs</DataField></Field><Field Name="tc"><DataField>tc</DataField></Field><Field Name="tes"><DataField>tes</DataField></Field><Field Name="zcbz"><DataField>zcbz</DataField></Field><Field Name="syrq"><DataField>syrq</DataField></Field></Fields><Query><CommandText>RPT_SETT_入院登记表</CommandText><DataSourceName>数据源1</DataSourceName><CommandType>StoredProcedure</CommandType><QueryParameters><QueryParameter Name="@hospitalCode"><Value>=Parameters!hospitalCode.Value</Value></QueryParameter><QueryParameter Name="@patid"><Value>=Parameters!patid.Value</Value></QueryParameter></QueryParameters></Query></DataSet></DataSets><CustomProperties><CustomProperty><Name>DisplayType</Name><Value>Page</Value></CustomProperty><CustomProperty><Name>SizeType</Name><Value>Default</Value></CustomProperty><CustomProperty><Name>PaperOrientation</Name><Value>Portrait</Value></CustomProperty><CustomProperty><Name>数据集1_Data_Set_Fields</Name><Value>{"patid":{"aggregate":"Sum","dataType":"Integer"},"kh":{"aggregate":"Count","dataType":"String"},"zyh":{"aggregate":"Count","dataType":"String"},"zyh2":{"aggregate":"Count","dataType":"String"},"xm":{"aggregate":"Count","dataType":"String"},"zjh":{"aggregate":"Count","dataType":"String"},"py":{"aggregate":"Count","dataType":"String"},"csny":{"aggregate":"Count","dataType":"String"},"xb":{"aggregate":"Count","dataType":"String"},"nl":{"aggregate":"Sum","dataType":"Integer"},"brly":{"aggregate":"Count","dataType":"String"},"blh":{"aggregate":"Count","dataType":"String"},"dh":{"aggregate":"Count","dataType":"String"},"hf":{"aggregate":"Sum","dataType":"Integer"},"jkjlmc":{"aggregate":"Count","dataType":"String"},"cw":{"aggregate":"Count","dataType":"String"},"zdmc1":{"aggregate":"Count","dataType":"String"},"zdmc2":{"aggregate":"Count","dataType":"String"},"zdmc3":{"aggregate":"Count","dataType":"String"},"ryrq":{"aggregate":"Count","dataType":"String"},"cyrq":{"aggregate":"Count","dataType":"String"},"ksmc":{"aggregate":"Count","dataType":"String"},"ks":{"aggregate":"Count","dataType":"String"},"bqmc":{"aggregate":"Count","dataType":"String"},"gms":{"aggregate":"Count","dataType":"String"},"rybq":{"aggregate":"Count","dataType":"String"},"zy":{"aggregate":"Count","dataType":"String"},"cs_sheng":{"aggregate":"Count","dataType":"String"},"cs_shi":{"aggregate":"Count","dataType":"String"},"cs_xian":{"aggregate":"Count","dataType":"String"},"cs_dz":{"aggregate":"Count","dataType":"String"},"xian_dz":{"aggregate":"Count","dataType":"String"},"xian_sheng":{"aggregate":"Count","dataType":"String"},"xian_shi":{"aggregate":"Count","dataType":"String"},"xian_xian":{"aggregate":"Count","dataType":"String"},"hu_dz":{"aggregate":"Count","dataType":"String"},"hu_sheng":{"aggregate":"Count","dataType":"String"},"hu_shi":{"aggregate":"Count","dataType":"String"},"hu_xian":{"aggregate":"Count","dataType":"String"},"birthAddress":{"aggregate":"Count","dataType":"String"},"xianAddress":{"aggregate":"Count","dataType":"String"},"huAddress":{"aggregate":"Count","dataType":"String"},"jjlxr_sheng":{"aggregate":"Count","dataType":"String"},"jjlxr_shi":{"aggregate":"Count","dataType":"String"},"jjlxr_xian":{"aggregate":"Count","dataType":"String"},"jjlxr_dz":{"aggregate":"Count","dataType":"String"},"jjlxrAddress":{"aggregate":"Count","dataType":"String"},"hy":{"aggregate":"Count","dataType":"String"},"gjmc":{"aggregate":"Count","dataType":"String"},"gjCode":{"aggregate":"Count","dataType":"String"},"mzmc":{"aggregate":"Count","dataType":"String"},"mzCode":{"aggregate":"Count","dataType":"String"},"bje":{"aggregate":"Sum","dataType":"Float"},"lxr":{"aggregate":"Count","dataType":"String"},"lxrRelaName":{"aggregate":"Count","dataType":"String"},"lxr2":{"aggregate":"Count","dataType":"String"},"dybh":{"aggregate":"Sum","dataType":"Integer"},"lxrdh":{"aggregate":"Count","dataType":"String"},"lxryddh2":{"aggregate":"Count","dataType":"String"},"lxrdz":{"aggregate":"Count","dataType":"String"},"lxrdz2":{"aggregate":"Count","dataType":"String"},"lxrEmail":{"aggregate":"Count","dataType":"String"},"lxrEmail2":{"aggregate":"Count","dataType":"String"},"lxrgx":{"aggregate":"Count","dataType":"String"},"lxrgx2":{"aggregate":"Count","dataType":"String"},"lxrjtdh":{"aggregate":"Count","dataType":"String"},"lxrjtdh2":{"aggregate":"Count","dataType":"String"},"lxrWebchat":{"aggregate":"Count","dataType":"String"},"lxrWebchat2":{"aggregate":"Count","dataType":"String"},"rytj":{"aggregate":"Count","dataType":"String"},"brxzmc":{"aggregate":"Count","dataType":"String"},"brxzbh":{"aggregate":"Sum","dataType":"Integer"},"brxz":{"aggregate":"Count","dataType":"String"},"jkjl":{"aggregate":"Count","dataType":"String"},"doctor":{"aggregate":"Count","dataType":"String"},"doctormc":{"aggregate":"Count","dataType":"String"},"ryzd1":{"aggregate":"Count","dataType":"String"},"ryzd2":{"aggregate":"Count","dataType":"String"},"ryzd3":{"aggregate":"Count","dataType":"String"},"bq":{"aggregate":"Count","dataType":"String"},"zjlx":{"aggregate":"Count","dataType":"String"},"ys":{"aggregate":"Count","dataType":"String"},"phone":{"aggregate":"Count","dataType":"String"},"jjlldh":{"aggregate":"Count","dataType":"String"},"jjllr":{"aggregate":"Count","dataType":"String"},"bz":{"aggregate":"Count","dataType":"String"},"dz":{"aggregate":"Count","dataType":"String"},"dwmc":{"aggregate":"Count","dataType":"String"},"zcyy":{"aggregate":"Count","dataType":"String"},"cblb":{"aggregate":"Count","dataType":"String"},"ssczdm":{"aggregate":"Count","dataType":"String"},"ssczmc":{"aggregate":"Count","dataType":"String"},"syfwzh":{"aggregate":"Count","dataType":"String"},"sylb":{"aggregate":"Count","dataType":"String"},"sysslb":{"aggregate":"Count","dataType":"String"},"wybz":{"aggregate":"Count","dataType":"String"},"yzs":{"aggregate":"Count","dataType":"String"},"tc":{"aggregate":"Count","dataType":"String"},"tes":{"aggregate":"Count","dataType":"String"},"zcbz":{"aggregate":"Count","dataType":"String"},"syrq":{"aggregate":"Count","dataType":"DateTime"}}</Value></CustomProperty></CustomProperties></Report>', 1, N'2024-08-14 14:05:59.943', N'xztest', N'2024-08-15 14:27:32.467', N'admin', 1);
SET IDENTITY_INSERT NewtouchHIS_Base.dbo.Sys_ReportTemplate OFF;
